package nl.unimaas.micc.eventSnookerTest.math;

public class Transformation3D
{
	private double[][] matrix;
	public Transformation3D(double[][] matrix)
	{
		this.matrix = matrix;
	}
	
	public Transformation3D(double x1,double x2,double x3,double y1,double y2,double y3,double z1,double z2,double z3)
	{
		double[][] mat = {{x1,y1,z1},{x2,y2,z2},{x3,y3,z3}};
		this.matrix = mat;
	}
	public Vector3D transform(Vector3D v)
	{
		return new Vector3D(
				matrix[0][0]*v.x+matrix[0][1]*v.y+matrix[0][2]*v.z,
				matrix[1][0]*v.x+matrix[1][1]*v.y+matrix[1][2]*v.z,
				matrix[2][0]*v.x+matrix[2][1]*v.y+matrix[2][2]*v.z);
	}
}
